mm: Keep heap accessible to others while scrubbing
authorBoris Ostrovsky <boris.ostrovsky@oracle.com>
Wed, 16 Aug 2017 18:31:00 +0000 (20:31 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 22 Aug 2017 08:41:25 +0000 (10:41 +0200)
commitb43abf5ca3412554b97936e57714581c86ff440f
tree825068e4fd106f8ae0c669104005c8ea8808e6d0
parent462090402a1485504c18d79f7a22b8ead03f1fdd
mm: Keep heap accessible to others while scrubbing

Instead of scrubbing pages while holding heap lock we can mark
buddy's head as being scrubbed and drop the lock temporarily.
If someone (most likely alloc_heap_pages()) tries to access
this chunk it will signal the scrubber to abort scrub by setting
head's BUDDY_SCRUB_ABORT bit. The scrubber checks this bit after
processing each page and stops its work as soon as it sees it.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Julien Grall <julien.grall@arm.com>
xen/common/page_alloc.c
xen/include/asm-arm/mm.h
xen/include/asm-x86/mm.h